package test2;

public class Test {
    public static void main(String[] args) {

        Printer printer = new Printer();

        new Thread(()->{
            for (int i = 0; i < 100; i++) {
                printer.print0();
            }

        },"a").start();

        new Thread(()->{
            for (int i = 0; i < 100; i++) {
                printer.print1();
            }

        },"b").start();
    }
}
